package com.cy.pj.sys.Dao;

import com.cy.pj.common.pojo.JsonResult;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

@Mapper
public interface SysMenuDao {

    List<Map<String,Object>> doFindMenu();

    @Delete("delete from sys_menus where id={id}")
    int doDeleteMenu(Integer id);
    @Update("update sys_menus set name=#{name},remark=#{remark} where id=#{id}")
    int doUpdateMenu(JsonResult result);

    @Insert("insert into sys_menus (name,remark,createdTime) values (#{name},#{remark},now())")
    int insertBrand(JsonResult result);
}
